<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <meta name="keywords" content="number,radix,convert,进制，数基" />        
    <meta name="description" content="一款很棒的进制转换小工具，支持常用进制的随意转换" />  
    <meta name="author" content="yanhaijing">
    
    <title>进制转换工具</title>
    <link rel="stylesheet" href="plugin/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/index.css">
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">进制转换工具</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li><a href="http://yanhaijing.com" target="_blank">我的博客</a></li>
            <li><a href="http://yanhaijing.com/basejs/" target="_blank">JavaScript简易教程</a></li>
            <li><a href="http://yanhaijing.com/es5/" target="_blank">ECMAScript5合集</a></li>
            <li><a href="http://yanhaijing.com/myProject" target="_blank">开源项目</a></li>
            <li><a href="https://github.com/yanhaijing/radixConvert#readme" target="_blank">关于</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>
    <section class="container-fluid">
        <h1>进制转换工具</h1>
        <div class="row">
            <div class="col-md-12">
                <form class="form">
                    <div class="form-group">
                        <label for="number">数据源：</label>
                        <input id="number" class="form-control" type="text" autofocus required placeholder="仅支持整数">            
                    </div>
                    <div class="form-group">
                        <label for="radix">数据基数：</label>
                        <select id="radix" class="form-control">
                            <option value="10" selected>十进制</option>
                            <option value="16">十六进制</option>
                            <option value="2">二进制</option>
                            <option value="8">八进制</option>                            
                        </select>
                    </div>                   

                    <label><input id="submit" class="btn btn-default btn-primary" type="submit" value="转换"></label>
                </form>
            </div>
        </div>
        <div class="result-wp">
            <h2>常用进制</h2>
            <div id="result"></div>
        </div>       
    </section>
    
    <script id="t:result" type="text/template">
    <div class="item">
        <span><%=radix%>进制：</span>
        <%=number%>
    </div>
    </script>
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="plugin/bootstrap/js/bootstrap.min.js"></script>
    <script src="js/baiduTemplate.js"></script>
    <script src="js/index.js"></script>
    <script src="//yanhaijing.com/assets/plugin/tongji/baidu.js"></script>
</body>
</html>
